//package com.taobao.me.config;
//
//import org.springframework.amqp.core.Binding;
//import org.springframework.amqp.core.BindingBuilder;
//import org.springframework.amqp.core.DirectExchange;
//import org.springframework.amqp.core.Queue;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
//@Configuration
//public class DirectConfiguration {
//
//    @Bean
//    public DirectExchange directExchange(){
//        return new DirectExchange("taobao.direct");
//    }
//
//    /**
//     * Queue 定义
//     */
//    @Bean
//    public Queue directQueue1(){
//        return new Queue("direct.queue1");
//    }
//
//    @Bean
//    public Binding directQueue1BindingWork1(Queue directQueue1, DirectExchange directExchange){
//        return BindingBuilder.bind(directQueue1).to(directExchange).with("work1");
//    }
//
//    @Bean
//    public Binding directQueue1BindingWork2(Queue directQueue1, DirectExchange directExchange){
//        return BindingBuilder.bind(directQueue1).to(directExchange).with("work2");
//    }
//
//    @Bean
//    public Queue directQueue2(){
//        return new Queue("direct.queue2");
//    }
//
//    @Bean
//    public Binding directQueue2BindingWork1(Queue directQueue2, DirectExchange directExchange){
//        return BindingBuilder.bind(directQueue2).to(directExchange).with("work1");
//    }
//
//    @Bean
//    public Binding directQueue2BindingWork2(Queue directQueue2, DirectExchange directExchange){
//        return BindingBuilder.bind(directQueue2).to(directExchange).with("work2");
//    }
//
//}
